import java.util.Scanner;
public class main {
	/**
	 * @param args
	 */
	@SuppressWarnings("unused")
	static Scanner input=new Scanner(System.in);
public static void main(String[] args){
	Pet pet = new Pet();
	Dog dog =new Dog();
	String name;
	String bred;
	int age;
	boolean hapi = true;
	boolean adog=true;
	System.out.println("What is the name of your pet?");
	name=input.next();
	System.out.println("Is it a dog?");
	adog=input.nextBoolean();
	if (adog==true){
		System.out.println("What is it's breed?");
		bred=input.next();
		dog.setBreed(bred);
	}
	System.out.println("How about it's age?");
	age=input.nextInt();
	System.out.println("Is it happy?");
	hapi=input.nextBoolean();
	if (adog==true){
		dog.setName(name);
		try{
		dog.setInt(age);
		}catch(NNE a){
			System.out.println(a);
		}
		dog.setBoo(hapi);
		dog.proc();
	}
	else{
		pet.procAll();
		pet.setName(name);
		try{
			pet.setInt(age);
			}catch(NNE a){
				System.out.println(a);
			}
		pet.setBoo(hapi);
	}
	}
	
}
